<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
	<title>注册登录</title>
	<link rel="stylesheet" href="/Public/css/login.css">
</head>
<body>
	<div class="fifth">
		<div class="dlbox">
			<div class="dlbox1">
				<form action="<?php echo U('Public/checklogin');?>" method="post" class="layui-form layui-form-pane">
					<input name="tel" type="text" class="sjh layui-input" lay-verify="required" placeholder="用户名" autofocus="autofocus" lay-verify="phone"/>
					<input name="password" type="password" class="sjh layui-input" lay-verify="required" placeholder="密码" lay-verify="pass"/>
					<div class="jzmm">
						<!--<div class="jzkk">-->
							<!--<img src="/Public/images/gg.png"/>-->
						<!--</div>-->
						<!--<div class="wdzh">记住我的账号</div>-->
					</div>
					<button type="submit" lay-submit="" lay-filter="*"  class="dlkk">登录</button>
					<!--<div class="botbox">-->
						<!--<a href="<?php echo ($url); ?>" class="ljzc">-->
							<!--立即注册-->
						<!--</a>-->
						<!--<a href="<?php echo ($url); ?>" class="smdl">-->
							<!--扫码登录-->
						<!--</a>-->
					<!--</div>-->
				</form>
			</div>
			
		</div>
	</div>
	<script src="/Public/layui/layui.js"></script>
	<script src="/Public/js/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
	$('.jzmm').click(function(){
		if($('.jzkk img').css('display') == 'block'){
			$('.jzkk img').css('display','none')
		}else{
			$('.jzkk img').css('display','block')
		}
	})
	layui.use(['layer', 'form'], function(){
    var layer = layui.layer
    ,form = layui.form;

    form.on('submit(*)', function(data){
        console.log(data.elem) //被执行事件的元素DOM对象，一般为button对象
        console.log(data.form) //被执行提交的form对象，一般在存在form标签时才会返回
        console.log(data.field) //当前容器的全部表单字段，名值对形式：{name: value}
        $.post("<?php echo U('checklogin');?>", data.field,function(e){
            layer.alert(e.info,function(index){
                if(e.status){
                    location.href = e.url;
                }else{
                    layer.close(index);
                }
            });
        })
        return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
    });
    // layer.msg('Hello World');
});
	</script>
</body>
</html>